<template>
  <div >
      <el-button type="primary" style="width: 100%;background: #505458;border: none" v-on:click="lookpermission">查看有啥权限</el-button>
      <el-button type="primary" style="width: 100%;background: #505458;border: none" v-on:click="admintest">只有ADMIN才有权力访问！</el-button>
    <el-button type="primary" style="width: 100%;background: #505458;border: none" v-on:click="getmenu">获取菜单！</el-button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App'
    }
  },
  methods: {
    lookpermission(){
      var _this = this;
      this.$axios.get('/tasks/get').then(resp => {
        console.log(resp);
      })
    },
    admintest(){
      var _this = this;
      this.$axios.get('/ADMINtasks/get').then(resp => {
        console.log(resp);
      })
    },
    getmenu(){
      var _this = this;
      this.$axios.get('/menu').then(resp => {
        console.log(resp);
      })
    }

  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
